﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link type="text/css" rel="stylesheet" media="all" href="../styles/global.css" />
    <link type="text/css" rel="stylesheet" media="all" href="../styles/global_color.css" />
    <script type="text/javascript" src="../js/jquery.js"></script>
    <script type="text/javascript">
        $(function(){
            $("#smb").click(function(){
                $.ajax({
                    url : '${pageContext.request.contextPath}/admin/updateInfo.do',
                    data: $(".main_form").serialize(),
                    success:function(result){
                        $("#save_result_info").text(result);
                        $("#save_result_info").css("display","block");
                        setTimeout("$('#save_result_info').css('display','none');",2000);
                    }
                });
            });
            $(".information_off").attr("class","information_on");
        })

    </script>
</head>
<body>
<!--Logo区域开始-->
<div id="header">
    <img src="../images/logo.png" alt="logo" class="left"/>
    ${admin.aname}
    <a href="../admin/exit.do">[退出]</a>
</div>
<!--Logo区域结束-->
<!--导航区域开始-->
<div id="navi">
    <ul id="menu">
        <c:forEach items="${admin.lp}" var="priv">
            <li><a href="${pageContext.request.contextPath}${priv.purl}" class="${priv.pclass}_off"></a></li>
        </c:forEach>
    </ul>
</div>
<!--导航区域结束-->
<!--主要区域开始-->
<div id="main">
    <!--保存操作后的提示信息：成功或者失败-->
    <div id="save_result_info" class="save_success">保存成功！</div><!--保存失败，数据并发错误！-->
    <form action="../admin/updateInfo.do" method="post" class="main_form">
        <div class="text_info clearfix"><span>管理员账号：</span></div>
        <div class="input_info"><input type="text" readonly="readonly"  class="readonly" value="${admin.acname }" /></div>
        <div class="text_info clearfix"><span>角色：</span></div>
        <div class="input_info">
            <input type="text" readonly="readonly" class="readonly width400" value="${admin.rname }" />
        </div>
        <div class="text_info clearfix"><span>姓名：</span></div>
        <div class="input_info">
            <input type="text" name="aname" value="${admin.aname }" />
            <span class="required">*</span>
            <div class="validate_msg_long error_msg">20长度以内的汉字、字母的组合</div>
        </div>
        <div class="text_info clearfix"><span>电话：</span></div>
        <div class="input_info">
            <input type="text" class="width200" name="atel" value="${admin.atel }" />
            <div class="validate_msg_medium">电话号码格式：手机或固话</div>
        </div>
        <div class="text_info clearfix"><span>Email：</span></div>
        <div class="input_info">
            <input type="text" class="width200" name="aemail" value="${admin.aemail}" />
            <div class="validate_msg_medium">50长度以内，符合 email 格式</div>
        </div>
        <div class="text_info clearfix"><span>创建时间：</span></div>
        <div class="input_info"><input type="text" readonly="readonly" class="readonly" value="${admin.createTime }"/></div>
        <div class="button_info clearfix">
            <input type="button" value="保存" class="btn_save" id="smb" />
            <input type="button" value="取消" class="btn_save" />
            <input type="hidden" name="id" value="${admin.id}">
        </div>
    </form>
</div>
<!--主要区域结束-->
<div id="footer">

</div>
</body>
</html>
